<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: LinearIntplMapping Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00120.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">LinearIntplMapping Class Reference<div class="ingroups"><a class="el" href="a00520.html">mappingDetails - mostly internal mapping classes</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LinearIntplMapping" --><!-- doxytag: inherits="Mapping" -->
<p>Helper class which represents a linear interpolation between two other mappings.  
 <a href="a00120.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00300_source.html">MappingUtils.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LinearIntplMapping:</div>
<div class="dyncontent">
<div class="center"><img src="a00811.png" border="0" usemap="#LinearIntplMapping_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for LinearIntplMapping:</div>
<div class="dyncontent">
<div class="center"><img src="a00812.png" border="0" usemap="#LinearIntplMapping_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00813.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d2d40994606ca63257931dfacdd6d91"></a><!-- doxytag: member="LinearIntplMapping::LinearIntplMapping" ref="a2d2d40994606ca63257931dfacdd6d91" args="(const LinearIntplMapping &amp;o)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>LinearIntplMapping</b> (const <a class="el" href="a00120.html">LinearIntplMapping</a> &amp;o)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2375273490f558b53fb91741c7e9ec53"></a><!-- doxytag: member="LinearIntplMapping::operator=" ref="a2375273490f558b53fb91741c7e9ec53" args="(const LinearIntplMapping &amp;copy)" -->
<a class="el" href="a00120.html">LinearIntplMapping</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00120.html">LinearIntplMapping</a> &amp;copy)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b40ba5e6134a8d6eb7c4160188e9491"></a><!-- doxytag: member="LinearIntplMapping::swap" ref="a1b40ba5e6134a8d6eb7c4160188e9491" args="(LinearIntplMapping &amp;s)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>swap</b> (<a class="el" href="a00120.html">LinearIntplMapping</a> &amp;s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6cd4807affa51b25bf4dbad38b0ccc35"></a><!-- doxytag: member="LinearIntplMapping::LinearIntplMapping" ref="a6cd4807affa51b25bf4dbad38b0ccc35" args="(const ConstMapping *const left=NULL, const ConstMapping *const right=NULL, argument_value_cref_t f=Argument::MappedZero)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a6cd4807affa51b25bf4dbad38b0ccc35">LinearIntplMapping</a> (const <a class="el" href="a00058.html">ConstMapping</a> *const <a class="el" href="a00120.html#afafb880ac49c9f688a51b880cd421786">left</a>=NULL, const <a class="el" href="a00058.html">ConstMapping</a> *const <a class="el" href="a00120.html#a4a77750e0d7b50c0c18b0b55f4d0baff">right</a>=NULL, argument_value_cref_t f=<a class="el" href="a00013.html#a8523627cdc70492e5e0935b9a3a78cc4">Argument::MappedZero</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the <a class="el" href="a00120.html" title="Helper class which represents a linear interpolation between two other mappings.">LinearIntplMapping</a> with the passed left and right <a class="el" href="a00136.html" title="Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.">Mapping</a> to interpolate by the passed interpolation value. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adeef3fecfcb6b2551ee205e6e1e69166"></a><!-- doxytag: member="LinearIntplMapping::clone" ref="adeef3fecfcb6b2551ee205e6e1e69166" args="() const " -->
virtual <a class="el" href="a00136.html">Mapping</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#adeef3fecfcb6b2551ee205e6e1e69166">clone</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="a00111.html" title="Represents an interpolated value of any type.">Interpolated</a> mappings are not supposed to be cloned! <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual argument_value_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a8711b30cf4ab9148864caa503240adb4">getValue</a> (const <a class="el" href="a00013.html">Argument</a> &amp;pos) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the linear interpolated value of this <a class="el" href="a00136.html" title="Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.">Mapping</a>.  <a href="#a8711b30cf4ab9148864caa503240adb4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a3735ea665eb5d05d8f8d5fc29f408d"></a><!-- doxytag: member="LinearIntplMapping::createIterator" ref="a3a3735ea665eb5d05d8f8d5fc29f408d" args="()" -->
virtual <a class="el" href="a00137.html">MappingIterator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a3a3735ea665eb5d05d8f8d5fc29f408d">createIterator</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">An interpolated mapping doesn't have a valid "first"-entry, so this method is not supported. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00137.html">MappingIterator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#ad0da987f0b7bd22db5a18ca2558533a4">createIterator</a> (const <a class="el" href="a00013.html">Argument</a> &amp;pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an iterator for this mapping starting at the passed position.  <a href="#ad0da987f0b7bd22db5a18ca2558533a4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8da77310505c9367e0b687f5e9934555"></a><!-- doxytag: member="LinearIntplMapping::setValue" ref="a8da77310505c9367e0b687f5e9934555" args="(const Argument &amp;, argument_value_cref_t)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a8da77310505c9367e0b687f5e9934555">setValue</a> (const <a class="el" href="a00013.html">Argument</a> &amp;, argument_value_cref_t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is not supported! <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afafb880ac49c9f688a51b880cd421786"></a><!-- doxytag: member="LinearIntplMapping::left" ref="afafb880ac49c9f688a51b880cd421786" args="" -->
const <a class="el" href="a00058.html">ConstMapping</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#afafb880ac49c9f688a51b880cd421786">left</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The left mapping to interpolate. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a77750e0d7b50c0c18b0b55f4d0baff"></a><!-- doxytag: member="LinearIntplMapping::right" ref="a4a77750e0d7b50c0c18b0b55f4d0baff" args="" -->
const <a class="el" href="a00058.html">ConstMapping</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a4a77750e0d7b50c0c18b0b55f4d0baff">right</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The right mapping to interpolate. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77ebd0c5378c9b518e317578c1b4a936"></a><!-- doxytag: member="LinearIntplMapping::factor" ref="a77ebd0c5378c9b518e317578c1b4a936" args="" -->
argument_value_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#a77ebd0c5378c9b518e317578c1b4a936">factor</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The interpolation factor determining the linear interpolation between left and right mapping. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Helper class which represents a linear interpolation between two other mappings. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Karl Wessel </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ad0da987f0b7bd22db5a18ca2558533a4"></a><!-- doxytag: member="LinearIntplMapping::createIterator" ref="ad0da987f0b7bd22db5a18ca2558533a4" args="(const Argument &amp;pos)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="a00137.html">MappingIterator</a>* LinearIntplMapping::createIterator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates an iterator for this mapping starting at the passed position. </p>
<p>Note: The returned Iterator does only support a subset of the normal MappingIterator-methods. See <a class="el" href="a00121.html" title="Helper-class for the MultiDimMapping which provides an Iterator which linear interpolates between two...">LinearIntplMappingIterator</a> for details. </p>

<p>Implements <a class="el" href="a00136.html#a8723ba0f78d2f259f1f150c9db346cb2">Mapping</a>.</p>
<div class="fragment"><pre class="fragment">                                                               {
    assert(<a class="code" href="a00120.html#afafb880ac49c9f688a51b880cd421786" title="The left mapping to interpolate.">left</a>);
    assert(<a class="code" href="a00120.html#a4a77750e0d7b50c0c18b0b55f4d0baff" title="The right mapping to interpolate.">right</a>);

    <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="a00121.html" title="Helper-class for the MultiDimMapping which provides an Iterator which linear interpolates between two...">LinearIntplMappingIterator</a>(<a class="code" href="a00120.html#afafb880ac49c9f688a51b880cd421786" title="The left mapping to interpolate.">left</a>-&gt;<a class="code" href="a00058.html#a5ff3a15fe6d536fa7a26a3fe1ff1b274" title="Returns a pointer of a new Iterator which is able to iterate over this Mapping.">createConstIterator</a>(pos), <a class="code" href="a00120.html#a4a77750e0d7b50c0c18b0b55f4d0baff" title="The right mapping to interpolate.">right</a>-&gt;<a class="code" href="a00058.html#a5ff3a15fe6d536fa7a26a3fe1ff1b274" title="Returns a pointer of a new Iterator which is able to iterate over this Mapping.">createConstIterator</a>(pos), <a class="code" href="a00120.html#a77ebd0c5378c9b518e317578c1b4a936" title="The interpolation factor determining the linear interpolation between left and right mapping...">factor</a>);
  }
</pre></div>
</div>
</div>
<a class="anchor" id="a8711b30cf4ab9148864caa503240adb4"></a><!-- doxytag: member="LinearIntplMapping::getValue" ref="a8711b30cf4ab9148864caa503240adb4" args="(const Argument &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual argument_value_t LinearIntplMapping::getValue </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00013.html">Argument</a> &amp;&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the linear interpolated value of this <a class="el" href="a00136.html" title="Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.">Mapping</a>. </p>
<p>The value is calculated by the following formula:</p>
<p>v = left + (right - left) * intplFactor </p>

<p>Implements <a class="el" href="a00058.html#afabbd15bb8f50e45901f99633d0a47c9">ConstMapping</a>.</p>

<p>References <a class="el" href="a00013.html#a657d962a1b965814e6b2eecb07f03e80">Argument::MappedOne</a>.</p>
<div class="fragment"><pre class="fragment">                                                               {
    assert(<a class="code" href="a00120.html#afafb880ac49c9f688a51b880cd421786" title="The left mapping to interpolate.">left</a>);
    assert(<a class="code" href="a00120.html#a4a77750e0d7b50c0c18b0b55f4d0baff" title="The right mapping to interpolate.">right</a>);

    argument_value_cref_t v0 = <a class="code" href="a00120.html#afafb880ac49c9f688a51b880cd421786" title="The left mapping to interpolate.">left</a>-&gt;<a class="code" href="a00058.html#afabbd15bb8f50e45901f99633d0a47c9" title="Returns the value of this Mapping at the position specified by the passed Argument.">getValue</a>(pos);
    argument_value_cref_t v1 = <a class="code" href="a00120.html#a4a77750e0d7b50c0c18b0b55f4d0baff" title="The right mapping to interpolate.">right</a>-&gt;<a class="code" href="a00058.html#afabbd15bb8f50e45901f99633d0a47c9" title="Returns the value of this Mapping at the position specified by the passed Argument.">getValue</a>(pos);
    <span class="comment">//return v0 + (v1 - v0) * factor;</span>
    <span class="keywordflow">return</span> v0 * (<a class="code" href="a00013.html#a657d962a1b965814e6b2eecb07f03e80" title="One value of a Argument value.">Argument::MappedOne</a> - <a class="code" href="a00120.html#a77ebd0c5378c9b518e317578c1b4a936" title="The interpolation factor determining the linear interpolation between left and right mapping...">factor</a>) + v1 * <a class="code" href="a00120.html#a77ebd0c5378c9b518e317578c1b4a936" title="The interpolation factor determining the linear interpolation between left and right mapping...">factor</a>;
  }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00300_source.html">MappingUtils.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00120.html">LinearIntplMapping</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
